import React, {Fragment} from 'react';
import {Icon, Switch} from "react-ui-xmui";

/**
 *     onSwitchChange?: (checked: boolean) => void;
 *     isChecked?: boolean;
 *     checkedChildren?: ReactNode;
 *     unCheckedChildren?: ReactNode;
 * @returns {JSX.Element}
 * @constructor
 */
const SwitchDemo2 = () => {
  return (
    <Fragment>
      <Switch isChecked={true} checkedChildren={'开'} unCheckedChildren={'关'}/>
      <Switch isChecked={true} checkedChildren={<Icon name={'checked'}/>} unCheckedChildren={<Icon name={'close'}/>}/>
    </Fragment>
  );
};

export default SwitchDemo2;